package top.ishowcode.bootweb01.services;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.ishowcode.bootweb01.bean.Product;
import top.ishowcode.bootweb01.mapper.ProductMapper;

@Service
public class ProductServices {
    @Autowired
    ProductMapper productMapper;
    public String getNameById(int id){
        Product product = productMapper.selectById(id);
        return product.getName();
    }

}
